import React from 'react'
import {useLocation}  from 'react-router-dom'
import qs from 'qs'

export default function News() {
  const location  = useLocation();

  const {name , age} = qs.parse(location.search.split("?")[1])
  return (
    <div>
      <h3>新闻</h3>
      <p>name:{name}</p>
      <p>age:{age}</p>
    </div>
  )
}
